package com.jady.main;

import java.util.Random;

/**
 * > Monitor the changes to foo var. >
 * 
 * @author yogeshsreedharan
 * 
 *         1. RUN this file: java -Xdebug
 *         -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
 *         com.jady.main.TestJad
 * 
 *         dir: /Users/yogeshsreedharan/Documents/workspace/JadY/bin
 * 
 *         2. run FieldMonitor
 */
public class TestJad {
	int foo; // var being watched by a seperate debugger thread.

	public TestJad() {
		System.out.println("TestJad Constructor Called...");
	}

	public void disp() {
		System.out.println("disp called");

	}

	public static void main(String[] args) {

		Random rand = new Random();
		TestJad test = new TestJad();

		for (int i = 0; i < 10; i++) {
			test.foo = rand.nextInt();
			System.out.println(test.foo);
		}

		test.callDisp(test);
	}

	private void callDisp(TestJad t) {
		t.disp();
	}

}
